local rolely_qiyi = fk.CreateSkill {
    name = "rolely_qiyi",
    tags = { Skill.Compulsory }
}
Fk:loadTranslationTable {
    ["rolely_qiyi"] = "起义",
    [":rolely_qiyi"] = "锁定技，准备阶段，其他角色需依次对你使用一张【杀】，未使用的角色失去一点体力，若有角色对你使用【杀】但未造成伤害，你获得其区域内的一张牌。",

    ["#rolely_qiyi-use"] = "起义：请对 %src 使用【杀】，否则失去一点体力。",

    ["$rolely_qiyi1"] = "黄巾的力量，需要你们的维护！",
    ["$rolely_qiyi2"] = "黄天挥军，四海皆应！",
}
rolely_qiyi:addEffect(fk.EventPhaseStart, {
    anim_type = "defensive",
    can_trigger = function(self, event, target, player, data)
        return target == player and player:hasSkill(rolely_qiyi.name) and player.phase == Player.Start
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        for _, p in ipairs(room:getOtherPlayers(player)) do
            if player.dead then return end
            local to = p
            if not to.dead then
                local use = room:askToUseCard(to, {
                    card_name = "slash",
                    pattern = "slash",
                    skill_name = rolely_qiyi.name,
                    prompt = "#rolely_qiyi-use:" .. player.id,
                    cancelable = true,
                    extra_data = { exclusive_targets = { player.id } },
                })
                if use then
                    use.extraUse = true
                    room:useCard(use)
                    if not use.damageDealt and not to:isNude() then
                        local card = room:askToChooseCard(player, {
                            target = to,
                            flag = "hej",
                            skill_name = rolely_qiyi.name,
                        })
                        room:obtainCard(player, card, false, fk.ReasonPrey, player)
                    end
                else
                    room:loseHp(to, 1, rolely_qiyi.name)
                end
            end
        end
    end,
})
return rolely_qiyi
